import Vue from 'vue'
import App from './App.vue'
//引入router路由器对象
import router from "@/router/router"
//引入TypeNav组件
import TypeNav from "@comp/TypeNav"
//引入Swiper组件
import Swiper from '@comp/Swiper'
//引入Pagination组件
import Pagination from '@comp/Pagination'


//引入懒加载插件
import VueLazyLoad from 'vue-lazyload'
import loading from "@/assets/01.gif"

Vue.use(VueLazyLoad,{
  preLoad: 1.3,
  loading,
})

import {
  Dialog,
  Button,
  Message,
} from 'element-ui';
Vue.use(Dialog)
Vue.use(Button)
Vue.prototype.$message = Message;

//引入vuex仓库
import store from "@/store"

// 全局注册TypeNav组件
Vue.component("TypeNav", TypeNav)
// 注册全局组件Swiper
Vue.component("Swiper", Swiper)
// 注册全局组件Pagination
Vue.component("Pagination", Pagination)

// 引入MOCK配置
import "@/mock"



Vue.config.productionTip = false

new Vue({
  render: h => h(App),
  //注入
  router: router,
  store: store,
  //绑定$bus
  beforeCreate() {
    Vue.prototype.$bus = this
  },
}).$mount('#app')